package com.huawei.windows;

/**
 * @author ：xxx
 * @description：GridLayout
 * @date ：2022/5/11 16:08
 */
import java.awt.*;

public class Layout {
    public static void main(String[] args) {
        Frame frame=new Frame("石头剪刀布游戏");
        Button button1=new Button("Man-machine battle");
        Button button2=new Button("Online battle");
        Button button3=new Button("Game setting");
        Button button4=new Button("Development group...");
        frame.setLayout(new GridLayout(3,2,20,10));
        frame.setSize(400,400);
        frame.setLocation(500,30);
        frame.add(button1);
        frame.add(button2);
        frame.add(button3);
        frame.add(button4);
        frame.setVisible(true);
    }
}




